﻿<%@ Page Title="" Language="C#" MasterPageFile="~/adminpanel.master" AutoEventWireup="true" CodeFile="PurchaseOrde.aspx.cs" Inherits="Web_PurchaseOrde" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v10.2.Export, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPivotGrid.Export" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPivotGrid" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.2.Export, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
   
 
    <style type="text/css">
        .style2
        {
            width: 90px;
        }
        .style4
        {
            width: 88px;
        }
        .style6
        {
            width: 545px;
        }
        .style8
        {
            width: 166px;
        }
        .style9
        {
            width: 89px;
        }
        .style10
        {
            width: 216px;
        }
    </style>
   
 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">



    <asp:Panel ID="Panel1" runat="server">
        <table width="100%" >
            <tr>
                <td class="style2" >
                    &nbsp;</td>
                <td >
                    &nbsp;</td>
                <td >
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2" >
                    &nbsp;</td>
                <td >
                    Order ID</td>
                <td >
                    <dx:ASPxTextBox ID="ASPxTextBox1" runat="server" ClientIDMode="AutoID" 
                        CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                        SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" Width="200px">
                        <ValidationSettings>
                            <ErrorFrameStyle ImageSpacing="4px">
                                <ErrorTextPaddings PaddingLeft="4px" />
                            </ErrorFrameStyle>
                            <RequiredField ErrorText="Please Enter Order ID" IsRequired="True" />
                        </ValidationSettings>
                    </dx:ASPxTextBox>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2" >
                    &nbsp;</td>
                <td >
                    Supplier Name</td>
                <td >
                    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
                        DataSourceID="SqlDataSource1" DataTextField="Sup_Name" DataValueField="Sup_ID" 
                        ontextchanged="DropDownList1_TextChanged" Width="200px">
                    </asp:DropDownList>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2" >
                    &nbsp;</td>
                <td >
                    Bill To</td>
                <td >
                    <asp:DropDownList ID="DropDownList2" runat="server" 
                        DataSourceID="SqlDataSource3" DataTextField="Contact" DataValueField="Contact" 
                        Width="200px">
                    </asp:DropDownList>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2" >
                    </td>
                <td >
                    Issue Date</td>
                <td >
                    <dx:ASPxDateEdit ID="ASPxDateEdit1" runat="server" Width="200px" 
                        ClientIDMode="AutoID" CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
                        CssPostfix="BlackGlass" 
                        SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css">
                        <CalendarProperties>
                            <HeaderStyle Spacing="1px" />
                            <FooterStyle Spacing="4px" />
                        </CalendarProperties>
                        <ValidationSettings>
                            <ErrorFrameStyle ImageSpacing="4px">
                                <ErrorTextPaddings PaddingLeft="4px" />
                            </ErrorFrameStyle>
                            <RequiredField ErrorText="Please Enter Date" IsRequired="True" />
                        </ValidationSettings>
                    </dx:ASPxDateEdit>
                </td>
                <td >
                    &nbsp;</td>
                <td >
                    </td>
            </tr>
            <tr>
                <td class="style2" >
                    &nbsp;</td>
                <td >
                    Expected Receipt Date</td>
                <td class="style6">
                    <dx:ASPxDateEdit ID="ASPxDateEdit2" runat="server" Width="200px" 
                        ClientIDMode="AutoID" CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
                        CssPostfix="BlackGlass" 
                        SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css">
                        <CalendarProperties>
                            <HeaderStyle Spacing="1px" />
                            <FooterStyle Spacing="4px" />
                        </CalendarProperties>
                        <ValidationSettings>
                            <ErrorFrameStyle ImageSpacing="4px">
                                <ErrorTextPaddings PaddingLeft="4px" />
                            </ErrorFrameStyle>
                            <RequiredField ErrorText="Please Enter Date" IsRequired="True" />
                        </ValidationSettings>
                    </dx:ASPxDateEdit>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2" >
                    &nbsp;</td>
                <td >
                    &nbsp;</td>
                <td >
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
                        SelectCommand="SELECT [Sup_ID], [Sup_Name] FROM [Tbl_Supplier]">
                    </asp:SqlDataSource>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2" >
                    &nbsp;</td>
                <td >
                    &nbsp;</td>
                <td >
                    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
                        SelectCommand="SELECT [Contact] FROM [Tbl_Supplier]"></asp:SqlDataSource>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
    </asp:Panel>



    <br />
    


    <asp:gridview ID="Gridview1" runat="server" ShowFooter="True" 
        AutoGenerateColumns="False" BackColor="#CCCCCC" BorderColor="#999999" 
        BorderStyle="Solid" BorderWidth="3px" CellPadding="4" CellSpacing="2" 
        ForeColor="Black" Width="100%">
        <Columns>
      
        <asp:TemplateField HeaderText="Product Name">
            <ItemTemplate>
                <asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True" 
                    DataSourceID="SqlDataSource1" DataTextField="Pro_Name" DataValueField="Pro_ID" 
                    onselectedindexchanged="DropDownList3_SelectedIndexChanged" 
                    >
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
                    SelectCommand="SELECT [Pro_ID], [Pro_Name] FROM [Tbl_Product]">
                </asp:SqlDataSource>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Description">
            <ItemTemplate>
                <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Unit Value" >
            <ItemTemplate>
                 <asp:TextBox ID="TextBox3" runat="server"  BackColor="#CED4DF" ForeColor="Black" 
                     ReadOnly="True"></asp:TextBox>
            </ItemTemplate>
           
        </asp:TemplateField>
            <asp:TemplateField HeaderText="Quantity">
            <ItemTemplate>
                <asp:TextBox ID="TextBox4" runat="server" AutoPostBack="True" 
                    ontextchanged="TextBox4_TextChanged"></asp:TextBox>
            </ItemTemplate>
            <FooterStyle HorizontalAlign="Right" />
            <FooterTemplate>
             <asp:Button ID="ButtonAdd" runat="server" Text="Add New Row" 
                    onclick="ButtonAdd_Click1" />
            </FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Line Total">
            <ItemTemplate>
                <asp:TextBox ID="TextBox5" runat="server" BackColor="#CED4DF"></asp:TextBox>
            </ItemTemplate>
             
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#CCCCCC" />
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
        <RowStyle BackColor="White" />
        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#808080" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#383838" />
</asp:gridview>
    


    <table width="100%" >
        <tr>
            <td>
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td class="style10" align="right">
                &nbsp;</td>
            <td class="style8" colspan="2">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td align="right" >
                &nbsp;</td>
            <td >
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td class="style10" align="right">
                <dx:ASPxLabel ID="ASPxLabel1" runat="server" ClientIDMode="AutoID" 
                    CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                    Font-Bold="True" ForeColor="#0000CC" Text="Total" Font-Size="Medium">
                </dx:ASPxLabel>
            </td>
            <td class="style8" colspan="2">
                <dx:ASPxTextBox ID="ASPxTextBox2" runat="server" style="margin-left: 0px" 
                    Width="170px" BackColor="#CED4DF">
                    <ValidationSettings>
                        <RequiredField ErrorText="Please Enter Order Details" IsRequired="True" />
                    </ValidationSettings>
                </dx:ASPxTextBox>
            </td>
            <td>
                &nbsp;</td>
            <td align="right" >
                &nbsp;</td>
            <td >
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td class="style10" align="right">
                &nbsp;</td>
            <td class="style8" colspan="2">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td align="right" >
                &nbsp;</td>
            <td >
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td class="style10" >
                &nbsp;</td>
            <td class="style8" >
                <dx:ASPxButton ID="ASPxButton1" runat="server" ClientIDMode="AutoID" 
                    CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                    onclick="ASPxButton1_Click" 
                    SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" 
                    Text="Record the Order" Height="27px" Width="137px">
                </dx:ASPxButton>
            </td>
            <td class="style9" >
                <dx:ASPxButton ID="ASPxButton2" runat="server" ClientIDMode="AutoID" 
                    CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                    SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" Text="Cancel" 
                    onclick="ASPxButton2_Click" Height="25px" Width="90px">
                </dx:ASPxButton>
            </td>
            <td>
                &nbsp;</td>
            <td >
                &nbsp;</td>
            <td >
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
    


    <table width="100%" >
        <tr>
            <td class="style4">
    


    <dx:ASPxImage ID="ASPxImage1" runat="server" Height="18px" ImageAlign="Right" 
                    ImageUrl="~/images/green-check-mark-clip-art.jpg" Visible="False">
    </dx:ASPxImage>
                </td>
            <td>
                <dx:ASPxLabel ID="ASPxLabel2" runat="server" ClientIDMode="AutoID" 
                    CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                    ForeColor="#009933" Visible="False" Font-Bold="True" Font-Names="Tahoma" 
                    Font-Size="Small">
                </dx:ASPxLabel>
    


            </td>
        </tr>
        <tr>
            <td class="style4">
    


                &nbsp;</td>
            <td>
                <dx:ASPxLabel ID="ASPxLabel3" runat="server" ForeColor="Red">
                </dx:ASPxLabel>
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
    


    <br />
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
        SelectCommand="SELECT [Pro_Name] FROM [Tbl_Product]" 
        >
    </asp:SqlDataSource>
     <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
        ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
        InsertCommand="INSERT INTO Tbl_GRNrequest(Pro_Name, Pur_Price, Description) VALUES (,,,)" 
       
        >
         <InsertParameters>
             <asp:Parameter Name="newparameter" />
             <asp:Parameter Name="newparameter" />
             <asp:Parameter Name="newparameter" />
             <asp:Parameter Name="newparameter" />
         </InsertParameters>
    
    
    </asp:SqlDataSource>


    </asp:Content>

